<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style type="text/css">
    .lunbo {
      width: 900px;
      height: 400px;
      margin: 100px auto;
    }

    .lunbo img {
      width: 100%;
      height: 100%;
    }
  </style>
</head>

<body>
  <div class="lunbo">
    <img id="lunbo_img" src="../2023.6.5号/img/arr.png">
  </div>
  <!-- Js代码 -->
  <script>
    var index = 1;
    function lunbo() {
      index++;
      //判断index是否大于3
      if (index > 3) {
        index = 1;
      }
      //获取img对象
      var img = document.getElementById("lunbo_img");
      img.src = "../2023.6.5号/img/num.png" + index + "";
    }
    //2.定义定时器
    setInterval(lunbo, 2000);
  </script>
</body>

</html>